//
//  Contact.m
//  04_集合(二)
//
//  Created by 徐昊 on 16/7/7.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "Contact.h"

@implementation Contact
#pragma mark - 自定义初始化方法
- (instancetype)initWithName:(NSString *)name
                 phoneNumber:(NSString *)phoneNumber {
    self = [super init];
    if (self) {
        // 初始化方法中, 不要使用set方法赋值
        _name = name;
        _phoneNumber = phoneNumber;
    }
    return self;
}
#pragma mark - 重写description方法
- (NSString *)description {
    return [NSString stringWithFormat:@"name = %@, phoneNumber = %@, sex = %@, address = %@, groupName = %@, age = %ld", _name, _phoneNumber, _gender, _address, _groupName, _age];
}
#pragma mark - 显示联系人
- (void)showContact {
    NSLog(@"%@", self);
}

@end
